//
//  PortOutProtocol.h
//  CocoaSynth
//
//  Created by Jérémy Brault on 06/02/10.
//  Copyright 2010 None. All rights reserved.
//

#import <Cocoa/Cocoa.h>

#import "SampleProtocol.h"

@protocol ComputingStrategyProtocol;
@protocol ConnectorProtocol;

@class Module;

/*!
    @protocol	PortOutProtocol
    @abstract	PortOutProtocol declares methods to manage a sample on a port.
*/
@protocol PortOutProtocol <NSObject>

/*!
 @method     setConnector
 @abstract   Change the connector the port is linked with.
 @param      connector	The new connector of the port.
 */
- (void)setConnector:(id<ConnectorProtocol>)aConnector;

/*!
    @method     isConnected
    @abstract   Indicate whether the port is connected or not.
    @result     YES if the port is connected, NO otherwise.
*/
- (BOOL)isConnected;

- (void)setComputingStrategy:(id<ComputingStrategyProtocol>)aComputingStrategy;

- (void)executeStrategy;

/*!
    @method     outputSample
    @abstract   Return the sample of the port.
	@result     The sample of the port.
*/
- (id<SampleProtocol>)outputSample;

/*!
    @method		setOutputSample
    @abstract	Change the sample of the port.
    @param		data	The new sample of the port.
*/
- (void)setOutputSample:(id<SampleProtocol>)aSample;

- (void)setDispatcher:(BOOL)dispatch;

- (BOOL)isDispatcher;

- (void)setModule:(Module*)aModule;

- (Module*)module;

@end
